from itpay.core.sys.const import BIZ_CONF_KEY
from itpay.utils.redis_client import redis_db_client


def get_order_can_comment():
    return True if redis_db_client.hget(BIZ_CONF_KEY, "order_can_comment") == "True" else False


def set_order_can_comment(can_comment):
    assert isinstance(can_comment, bool)
    return redis_db_client.hset(BIZ_CONF_KEY, "order_can_comment", can_comment)
